package com.aqarat.entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.core.entity.BaseEntity;

/**
 * Entity implementation class for Entity: Payment
 * 
 */
@Entity
@Table(name = " payments")
public class Payment extends BaseEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "recid", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long recid;

	private Double money;

	@Column(name = "payment_date")
	private Timestamp paymentDate;

	@Column(name = "apartment_id")
	private Long apartmentId;
	
	@ManyToOne
	@JoinColumn(name = "apartment_id",insertable=false,updatable=false)
	private Apartment apartment;
	
	@Column(name = "customer_id")
	private Long customerId;

	@ManyToOne
	@JoinColumn(name = "customer_id",insertable=false,updatable=false)
	private Customer customer;
	
	@Column(name = "status")
	private Long status;

	public Payment() {
	}
	public Long getRecid() {
		return recid;
	}

	public void setRecid(Long recid) {
		this.recid = recid;
	}

	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}

	public Timestamp getPaymentDate() {
		return paymentDate;
	}

	public void setPaymentDate(Timestamp paymentDate) {
		this.paymentDate = paymentDate;
	}

	public Long getApartmentId() {
		return apartmentId;
	}

	public void setApartmentId(Long apartmentId) {
		this.apartmentId = apartmentId;
	}

	public void setApartment(Apartment apartment) {
		this.apartment = apartment;
	}
	public Apartment getApartment() {
		return apartment;
	}
	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}

	public Long getStatus() {
		return status;
	}

	public void setStatus(Long status) {
		this.status = status;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	public Customer getCustomer() {
		return customer;
	}


}
